find_directories

This function returns all directories found matching a specified search pattern.

string[] find_directories(string search)

Parameters:
search
The search pattern that is to be used when looking for directories.

Return value:
Returns an array of directory names that match the specified search pattern, or an empty array on failure.

Remarks:
Wildcards are accepted in the search term. An asterisk (* sign) indicates 0 or more unknown characters while a question mark (? sign) represents up to 1 unknown character.

Please note that this function will only find directories. To find files use the find_files function.

If an empty string is passed as a parameter, the function will assume the search term "*" which is to say all folders in the current directory.

This function will accept absolute or relative paths.

The search term is not case sensitive.

Please note that the path may not end in a trailing slash or backslash.

Example:
// Find all directories on drive C.

void main()
{
string[] test;
test=find_directories("C:\\*");
for(uint counter=0; counter<test.length(); counter++)
{
alert("array", "array "+counter+"="+test[counter]);
}
}